import 'package:flutter_changdian_football/pages/clubs/announcement/announcement_page.dart';
import 'package:flutter_changdian_football/pages/clubs/club_info/club_info_page.dart';
import 'package:flutter_changdian_football/pages/clubs/club_news/club_news_page.dart';
import 'package:flutter_changdian_football/pages/clubs/club_players/club_players_page.dart';
import 'package:flutter_changdian_football/pages/clubs/create_club/create_club_page.dart';
import 'package:flutter_changdian_football/pages/clubs/create_contest/create_contest_page.dart';
import 'package:flutter_changdian_football/pages/clubs/finances/finances_page.dart';
import 'package:flutter_changdian_football/pages/clubs/player_info/player_info_page.dart';
import 'package:flutter_changdian_football/pages/home/club_ranking/club_ranking_page.dart';
import 'package:flutter_changdian_football/pages/home/club_ranking/desc/club_ranking_details_page.dart';
import 'package:flutter_changdian_football/pages/home/hall_of_fame/hall_of_fame_page.dart';
import 'package:flutter_changdian_football/pages/home/local_course/local_course_page.dart';
import 'package:flutter_changdian_football/pages/home/local_course_detail/local_course_detail_page.dart';
import 'package:flutter_changdian_football/pages/home/message/message_page.dart';
import 'package:flutter_changdian_football/pages/home/news/news_detail_page.dart';
import 'package:flutter_changdian_football/pages/login/login_page.dart';
import 'package:flutter_changdian_football/pages/main/main_page.dart';
import 'package:flutter_changdian_football/pages/match/enrollment_details/enrollment_details_page.dart';
import 'package:flutter_changdian_football/pages/match/modify_match/modify_match_page.dart';
import 'package:flutter_changdian_football/pages/match/pay_result/pay_result_page.dart';
import 'package:flutter_changdian_football/pages/match/recharge_payment/recharge_payment_page.dart';
import 'package:flutter_changdian_football/pages/mine/about_us/about_us_page.dart';
import 'package:flutter_changdian_football/pages/mine/application_setting/application_setting_page.dart';
import 'package:flutter_changdian_football/pages/mine/contact_customer_service/contact_customer_service_page.dart';
import 'package:flutter_changdian_football/pages/mine/feedback/feedback_page.dart';
import 'package:flutter_changdian_football/pages/mine/game_record/desc/game_record_desc_page.dart';
import 'package:flutter_changdian_football/pages/mine/game_record/game_record_page.dart';
import 'package:flutter_changdian_football/pages/mine/my_concerns/my_concerns_page.dart';
import 'package:flutter_changdian_football/pages/mine/my_purse/my_purse_page.dart';
import 'package:flutter_changdian_football/pages/mine/my_purse/recharge/recharge_page.dart';
import 'package:flutter_changdian_football/pages/mine/my_purse/withdraw/withdraw_page.dart';
import 'package:flutter_changdian_football/pages/mine/personal_info/personal_info_page.dart';
import 'package:flutter_changdian_football/pages/mine/push_setting/push_setting_page.dart';
import 'package:flutter_changdian_football/pages/mine/using_help/using_help_page.dart';
import 'package:flutter_changdian_football/pages/splash/splash_page.dart';
import 'package:flutter_changdian_football/routers/app_routes.dart';
import 'package:flutter_changdian_football/utils/custom_constant.dart';
import 'package:flutter_changdian_football/webview/custom_http_web_view.dart';
import 'package:get/route_manager.dart';

class AppPages {

  /// initial
  static const initial = AppRoutes.splash;

  static final routes = [
    /// 闪屏页
    GetPage(
      name: AppRoutes.splash,
      page: () => const SplashPage(),
    ),
    /// 主页
    GetPage(
      name: AppRoutes.main,
      page: () => const MainPage(),
    ),
    /// 新闻详情
    GetPage(
      name: AppRoutes.newsDetail,
      page: () => NewsDetailPage(
        newsId: Get.parameters['newsId'] ?? '',
      ),
    ),
    /// 消息中心
    GetPage(
      name: AppRoutes.message,
      page: () => const MessagePage(),
    ),
    /// 本地球场
    GetPage(
      name: AppRoutes.localCourse,
      page: () => const LocalCourse(),
    ),
    /// 本地球场详情
    GetPage(
      name: AppRoutes.localCourseDetail,
      page: () => LocalCourseDetailPage(
        courtId: Get.parameters['courtId'] ?? '',
      ),
    ),
    /// 俱乐部排行
    GetPage(
      name: AppRoutes.clubRanking,
      page: () => const ClubRankingPage(),
    ),
    /// 俱乐部排行详情
    GetPage(
      name: AppRoutes.clubRankingDetails,
      page: () => ClubRankingDetailsPage(
        clubId: Get.parameters['clubId'] ?? '',
      ),
    ),
    /// 名人堂
    GetPage(
      name: AppRoutes.hallOfFame,
      page: () => const HallOfFamePage(),
    ),
    /// 个人信息
    GetPage(
      name: AppRoutes.personalInfo,
      page: () => const PersonalInfoPage(),
    ),
    /// 比赛记录
    GetPage(
      name: AppRoutes.gameRecord,
      page: () => GameRecordPage(
        clubId: Get.parameters['clubId'],
        isMy: Get.parameters['isMy'] ?? 'N',
      ),
    ),
    /// 比赛记录详情
    GetPage(
      name: AppRoutes.gameRecordDesc,
      page: () => GameRecordDescPage(
        clubId: Get.parameters['clubId'] ?? '',
        matchId: Get.parameters['matchId'] ?? '',
      ),
    ),
    /// 我的钱包
    GetPage(
      name: AppRoutes.myPurse,
      page: () => const MyPursePage(),
    ),
    /// 提现
    GetPage(
      name: AppRoutes.withdraw,
      page: () => WithdrawPage(
        type: Get.parameters['type'] ?? CustomConstant.withdraw_normal,
        clubId: Get.parameters['clubId']
      ),
    ),
    /// 充值
    GetPage(
      name: AppRoutes.recharge,
      page: () => RechargePage(
        type: Get.parameters['type'] ?? CustomConstant.recharge_normal,
        clubId: Get.parameters['clubId']
      ),
    ),
    /// 我的关注
    GetPage(
      name: AppRoutes.myConcerns,
      page: () => const MyConcernsPage(),
    ),
    /// 应用设置
    GetPage(
      name: AppRoutes.applicationSetting,
      page: () => const ApplicationSettingPage(),
    ),
    /// 关于我们
    GetPage(
      name: AppRoutes.aboutUs,
      page: () => const AboutUsPage(),
    ),
    /// 使用帮助
    GetPage(
      name: AppRoutes.usingHelp,
      page: () => const UsingHelpPage(),
    ),
    /// 意见反馈
    GetPage(
      name: AppRoutes.feedback,
      page: () => const FeedbackPage(),
    ),
    /// 联系客服
    GetPage(
      name: AppRoutes.contactCustomerService,
      page: () => const ContactCustomerServicePage(),
    ),
    /// 俱乐部信息
    GetPage(
      name: AppRoutes.clubInfo,
      page: () => ClubInfoPage(
        clubId: Get.parameters['clubId']
      ),
    ),
    /// 俱乐部消息
    GetPage(
      name: AppRoutes.clubNews,
      page: () => ClubNewsPage(
        clubId: Get.parameters['clubId']
      ),
    ),
    /// 俱乐部球员
    GetPage(
      name: AppRoutes.clubPlayers,
      page: () => const ClubPlayersPage(),
    ),
    /// 球员信息
    GetPage(
      name: AppRoutes.playerInfo,
      page: () => PlayerInfoPage(
        type: Get.parameters['type'] ?? CustomConstant.USER_JB_INFO,
        queriedUserId: Get.parameters['queriedUserId'] ?? '',
        isOperate: Get.parameters['isOperate'] ?? 'false',
        clubId: Get.parameters['clubId'] ?? '',
      ),
    ),
    /// 财政
    GetPage(
      name: AppRoutes.finances,
      page: () => FinancesPage(
        clubId: Get.parameters['clubId'] ?? '',
      ),
    ),
    /// 创建比赛
    GetPage(
      name: AppRoutes.createContest,
      page: () => CreateContestPage(
        regionCode: Get.parameters['regionCode'] ?? '',
        clubId: Get.parameters['clubId'] ?? '',
      ),
    ),
    /// 创建俱乐部
    GetPage(
      name: AppRoutes.createClub,
      page: () => const CreateClubPage(),
    ),
    /// 发布公告
    GetPage(
      name: AppRoutes.announcement,
      page: () => AnnouncementPage(
        clubId: Get.parameters['clubId'] ?? '',
      ),
    ),
    /// 报名详情
    GetPage(
      name: AppRoutes.enrollmentDetails,
      page: () => EnrollmentDetailsPage(
        clubId: Get.parameters['clubId'] ?? '',
        matchId: Get.parameters['matchId'] ?? ''
      ),
    ),
    /// 修改比赛
    GetPage(
      name: AppRoutes.modifyMatch,
      page: () => ModifyMatchPage(
        matchId: Get.parameters['matchId'] ?? '',
        regionCode: Get.parameters['regionCode'] ?? ''
      ),
    ),
    /// 登录
    GetPage(
      name: AppRoutes.login,
      page: () => const LoginPage(),
    ),
    /// WebView
    GetPage(
      name: AppRoutes.inAppWebView,
      page: () => CustomHttpWebViewPage(
        title: Get.parameters['title'],
        type: Get.parameters['type'],
      ),
    ),
    /// 推送设置
    GetPage(
      name: AppRoutes.pushSetting,
      page: () => const PushSettingPage(),
    ),
    /// 充值/缴费
    GetPage(
      name: AppRoutes.rechargePayment,
      page: () => RechargePaymentPage(
        matchId: Get.parameters['matchId'] ?? '',
      ),
    ),
    /// 支付结果
    GetPage(
      name: AppRoutes.payResult,
      page: () => PayResultPage(
        orderNo: Get.parameters['orderNo'] ?? '',
        venueFees: Get.parameters['venueFees'] ?? '',
        payType: Get.parameters['payType'] ?? '',
        payResult: Get.parameters['payResult'] ?? '',
        desc: Get.parameters['desc'] ?? '',
      ),
    ),
  ];

}